﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Excel = Microsoft.Office.Interop.Excel;
using ExcelTools = Microsoft.Office.Tools.Excel;
using Cfg;
using ColumnsInformation;
using ListObjectMaker;

namespace TableInfo
{
    public class TableInfo
    {
        public int _cntEntries = 0;
        public int _entriesPerPage = 0;
        public int _nPage = 0;

        public SqlConnectionConfig _config;
        public string[] _columnsForShow;
        public ColumnsInfo _columnsInfo;
        public int _startRow;
        public int _endRow;
        public DataTable _table;
        public ListObjectMaker.MyListObject _listObjectMaker;
        public string _initPosOfInsertion;

        public TableInfo(SqlConnectionConfig config, ColumnsInfo colInfo, string[] colForShow,
            DataTable table, int startRow, int endRow, ListObjectMaker.MyListObject listObjectMaker, string initPosOfInsertion)
        {
            _config = config.Clone() as SqlConnectionConfig;
            _columnsInfo = colInfo.Clone() as ColumnsInfo;
            _columnsForShow = colForShow;
            _startRow = startRow;
            _endRow = endRow;
            _table = table; //table.Clone();
            _listObjectMaker = listObjectMaker;
            _initPosOfInsertion = initPosOfInsertion;

            _listObjectMaker.AutoFit();
        }

    }
}
